]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
PopupSwitchMenuItem: don't misuse this.active
authorDan Winship <danw@gnome.org>
Wed, 13 Oct 2010 18:10:38 +0000 (14:10 -0400)
committerDan Winship <danw@gnome.org>
Tue, 26 Oct 2010 14:16:03 +0000 (10:16 -0400)
The constructor was setting this.active to reflect the switch state,
which is wrong; this.active indicates whether or not the item is
highlighted.

https://bugzilla.gnome.org/show_bug.cgi?id=621671

js/ui/popupMenu.js

index 7ef3bbb8a306b09d7ee1626a284aa35dc102de60..23969a6a5e0483d4e3a9b85b447900b31682c8df 100644 (file)
@@ -508,9 +508,8 @@ PopupSwitchMenuItem.prototype = {
     _init: function(text, active) {
         PopupBaseMenuItem.prototype._init.call(this);
 
-        this.active = !!active;
         this.label = new St.Label({ text: text });
-        this._switch = new Switch(this.active);
+        this._switch = new Switch(active);
 
         this.addActor(this.label);
         this.addActor(this._switch.actor);